From 2e182d8eee925e90f1eeb15e29143fa7ee7e1de0 Mon Sep 17 00:00:00 2001 From: parkrrrr Date: Tue, 3 May 2005 16:41:06 +0000 Subject: [PATCH] tiny memory leaks --- gpsbabel/html.c | 8 ++++++-- gpsbabel/vcf.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/gpsbabel/html.c b/gpsbabel/html.c index 0b4c5dcbf..ab72d1c49 100644 --- a/gpsbabel/html.c +++ b/gpsbabel/html.c @@ -104,10 +104,14 @@ html_disp(const waypoint *wpt) } if (wpt->gc_data.terr) { if (wpt->gc_data.desc_short.utfstring) { - fprintf (file_out, "

%s

\n", strip_nastyhtml(wpt->gc_data.desc_short.utfstring)); + char *tmpstr = strip_nastyhtml(wpt->gc_data.desc_short.utfstring); + fprintf (file_out, "

%s

\n", tmpstr ); + xfree( tmpstr ); } if (wpt->gc_data.desc_long.utfstring) { - fprintf (file_out, "

%s

\n", strip_nastyhtml(wpt->gc_data.desc_long.utfstring)); + char *tmpstr = strip_nastyhtml(wpt->gc_data.desc_long.utfstring); + fprintf (file_out, "

%s

\n", tmpstr ); + xfree( tmpstr ); } if (wpt->gc_data.hint) { char *hint = NULL; diff --git a/gpsbabel/vcf.c b/gpsbabel/vcf.c index 64fb45cc1..aa6911acc 100644 --- a/gpsbabel/vcf.c +++ b/gpsbabel/vcf.c @@ -70,6 +70,7 @@ vcf_print_utf(const utf_string *s) fputs(p2, file_out); xfree(p); xfree(p2); + xfree(stripped_html); } static void -- 2.30.2